package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author 张永远
 * @since 2020-06-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_stock_log")
public class StockLogDo extends Model<StockLogDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("shop_id")
    private Long shopId;
    @TableField("product_id")
    private Long productId;

    @TableField("storage_id")
    private Long storageId;

    @TableField("commodity_sku")
    private String commoditySku;

    @TableField("third_order_number")
    private String thirdOrderNumber;

    @TableField("customer_order_number")
    private String customerOrderNumber;

    /**
     * 0 仓库盘点  1 出库 2 入库
     */
    @TableField("type")
    private Integer type;
    @TableField("status")
    private Integer status;
    /**
     * 数量
     */
    @TableField("count")
    private Integer count;

    /**
     * 剩余数量
     */
    @TableField("after_count")
    private Integer afterCount;

    @TableField("company_id")
    private Long companyId;

    /**
     * transferIn  transferOut库内调货
     */
    @TableField("note_type")
    private String noteType;


    /**
     * 发生时间
     */
    @TableField("create_time")
    private Date createTime;


    @TableField("input_time")
    private Date inputTime;
    /**
     * 操作人
     */
    @TableField("create_by")
    private Long createBy;

    @TableField("flowing_id")
    private Long flowingId;


    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
